package com.wcar.user.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wcar.common.entity.Menu;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface MenuDao extends BaseMapper<Menu> {
    @Select(value = "select distinct tm.* from tb_user_role tur join tb_role_menu tum on tur.role_id=tum.role_id" +" "+
            "join tb_menu tm on tum.menu_id=tm.menu_id where tum.role_id=#{roleId}")
    List<Menu> selectMenus(Integer roleId);
}
